import React, { Component } from 'react'
import { Modal } from 'antd';

const baseUrl = __DEV__?'/api':'';
const confirm = Modal.confirm;

export function  backUrl(url){
  return baseUrl + url
}

// 确认框
export function confirmDelete(doIt, cancel, msg){
  confirm({
    title: msg||'确定要删除吗?',
    content: '',
    onOk() {
      doIt()
    },
    onCancel() {
      cancel()
    },
  });
}
